import request from '@/utils/request';
import type { Permission } from '@/type/permissionType';
import type { ResponseType } from '@/type/ResponseType';

enum Enum {
  fetchPermissionListAPI = '/sys/permission',
  deletePermissionAPI = '/sys/permission'
}

/**
 * @description 获取-权限点列表的接口
 * */
export const fetchPermissionListAPI = () => request.get<Permission[], ResponseType<Permission[]>>(`${Enum.fetchPermissionListAPI}`);

/**
 * @description 删除-权限点的接口
 * */
export const deletePermissionAPI = (id: number) => request.delete<null, ResponseType<null>>(`${Enum.deletePermissionAPI}/${id}`);
